<?php
	if($ss_member_id){
		$tp->Block('post');
	}else{
		$tp->Block('login');	
	}
	$tp->Apply();
	
	
	list($sql,$all_page) = splitPage("`v_webboard`","`status` = '1' ORDER BY `topic_id` DESC", 3, $_GET['p']);
	$strPage = fetchPage($all_page,$_GET['p']);
	$query = mysql_query($sql);
	$tp->block('webboard');
	while($result = mysql_fetch_assoc($query)) {
		$w_topic_id	= $result['topic_id'];
		$w_title	= $result['title'];
		$w_view		= (int)$result['view'];
		$w_reply	= (int)$result['reply'];
		$w_date		= formatDate($result['date'], 'd/m/Y');
		$tp->apply();
	}
	mysql_free_result($query)
?>